import React from 'react'
import { Input } from 'antd';

let prevInstance;
class TestInput extends React.Component {
  state = {
    value: ''
  }
  handleOnChange = (ev) => {
    this.setState({
      value: ev.target.value
    })
  }
  getInput() {
    const { value } = this.state;
    return <Input onChange={this.handleOnChange} value={value} />
  }
  render() {
    const element = this.getInput()
    console.log('is same ', prevInstance === element, prevInstance, element)
    prevInstance = element;
    return element
  }
}

export default TestInput
